<template>
	<view class="wrap">
		<div class="topTile">
			<div class="dis">
				<div>{{othList.housekeepName}}</div>
				<!-- <div>泊寓-沈辽旅二点</div> -->
			</div>
			<div class="des">真房源明价格，15天免费换房，住房放心选宜居～</div>
		</div>
		<view class="qrcode" style="">
			<!-- <view v-for="(row, rowI) in modules" :key="rowI" style="display: flex;flex-direction: row;">
				<view v-for="(col, colI) in row" :key="colI">
					<view v-if="col.isBlack" style="width: 10px;height: 10px;background-color: black;"> -->
			<!-- 黑色码点 -->
			<!-- </view>
					<view v-else style="width: 10px;height: 10px;background-color: white;"> -->
			<!-- 白色码点 -->
			<!-- 	</view>
				</view>
			</view> -->
			<image class="qrcode" show-menu-by-longpress="true"  :src="othList.housekeepWechatUrl" mode="scaleToFill" ></image>
		</view>
		<div style="margin-top: 30px; text-align: center">长按识别二维码，添加我的微信</div>

	</view>
</template>

<script>
	import config from '../../config.js';
	import UQRCode from '../../common/js/uqrcode.js';
	export default {
		data() {
			return {
				id: Math.floor(Math.random() * 1000000000),
				modules: [],
				othList: [],
			}
		},
		onLoad(option) {
			let pream = {
				deptId: option.deptId
			}
			this.api.get('fangyuan/store/app/storeAppPeriphery', pream).then(res => {
				if (res.data.code == 200) {
					this.othList = res.data.data
				}
			})
			// this.ewmFun()
			// const qr = new UQRCode();
			// qr.data = this.id
			// qr.make();
			// this.modules = qr.modules;
		},
		methods: {
			ewmFun() {
				uni.request({
					url: config.host + 'system/plate/app/ewm',
					success: (res) => {

					}
				})
			},
			image(e) {
				console.log(e)
				uni.previewImage({
					// 需要预览的图片链接列表。若无需预览，可以注释urls
					urls: [],
					// 为当前显示图片的链接/索引值
					current: e,
					// 图片指示器样式	
					indicator: 'default',
					// 是否可循环预览
					loop: false,
					success: res => {
						console.log('previewImage res', res);
					},
					fail: err => {
						console.log('previewImage err', err);
					}
				});
			}
		}
	}
</script>

<style lang="less">
	page {
		padding-top: 50px;
		background: #f0f0f0;
	}

	.wrap {
		background-color: #fff;
		margin-top: 50px;
		border-radius: 10px;
		box-shadow: 5px 5px 5px #f0f0f0;
		width: 330px;
		margin: 0 auto;
		padding-bottom: 50px;
	}

	.topTile {
		border-top-left-radius: 10px;
		border-top-right-radius: 10px;
		background-color: #ee7c4c;
		height: 90px;
		color: #fff;
	}

	.qrcode {
		width: 400rpx;
		height: 400rpx;
		margin: 0 auto;
		// margin-top: 40px;
	}

	.dis {
		padding-top: 20px;
		margin: 0px 15px;
		display: flex;
		justify-content: space-between;
	}

	.des {
		margin: 0px 15px;
		margin-top: 15px;
		font-size: 12px;
	}
</style>